import { createApp } from 'vue';
import 'virtual:svg-icons-register';
import { createPinia } from 'pinia';
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
import './styles/input.css';
import './styles/base.scss';

import App from './App.vue';
import router from './router';

import PrimeVue from 'primevue/config';
import ToastService from 'primevue/toastservice';
import 'primevue/resources/themes/aura-light-green/theme.css';
import 'primeicons/primeicons.css';

import VueHighlightJS from 'vue3-highlightjs';
import 'vue3-highlightjs/styles/atom-one-dark-reasonable.css';

const app = createApp(App);
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);

app.use(pinia);
app.use(router);
app.use(PrimeVue);
app.use(ToastService);
app.use(VueHighlightJS);

app.mount('#app');

// (function (d, t) {
//   var BASE_URL = 'https://app.chatwoot.com';
//   var g = d.createElement(t),
//     s = d.getElementsByTagName(t)[0];
//   g.src = BASE_URL + '/packs/js/sdk.js';
//   g.defer = true;
//   g.async = true;
//   s.parentNode.insertBefore(g, s);
//   g.onload = function () {
//     window.chatwootSDK.run({
//       websiteToken: 'znjtmEK9jv5zv9w649AHqU8F',
//       baseUrl: BASE_URL
//     });
//   };
// })(document, 'script');
